package com.cloud.api.domain.service;

import com.cloud.api.myenum.CompanyEnum;
import com.cloud.api.myenum.StationType;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
@Schema(description = "站点信息")
public class StationInfo implements Serializable {

    @Schema(description = "主键")
    private String id;

    @Schema(description = "所属销售公司")
    @NotNull(message = "{validation.service.salesCompany}")
    private CompanyEnum salesCompany;

    @Schema(description = "分类")
    @NotNull(message = "{validation.service.category}")
    private StationType category;

    @Schema(description = "名称")
    @NotEmpty(message = "{validation.service.name}")
    @Size(min = 1, max = 50, message = "{validation.service.name.size}")
    private String name;

    @Schema(description = "简称")
    @NotEmpty(message = "{validation.service.shortName}")
    @Size(min = 1, max = 10, message = "{validation.service.name.size}")
    private String shortName;

    @Schema(description = "状态(0-禁用，1-启用)")
    @NotNull(message = "{validation.command.status}")
    private Integer status;

    @Schema(description = "联系人")
    @NotEmpty(message = "{validation.service.contactPerson}")
    @Size(min = 1, max = 8, message = "{validation.service.name.size}")
    private String contactPerson;

    @Schema(description = "联系电话")
    @NotEmpty(message = "{validation.service.contactPhone}")
    @Pattern(regexp = "^1\\d{10}$",message = "{validation.common.contactPhoneFormat}")
    private String contactPhone;

    @Schema(description = "省份")
    @NotEmpty(message = "{validation.common.province}")
    private String province;

    @Schema(description = "城市")
    @NotEmpty(message = "{validation.common.city}")
    private String city;

    @Schema(description = "区县")
    @NotEmpty(message = "{validation.common.district}")
    private String district;

    @Schema(description = "详细地址")
    @Size(min = 1, max = 60, message = "{validation.service.name.size}")
    private String address;

    @Schema(description = "经度")
//    @NotNull(message = "{validation.common.lng}")
    private BigDecimal longitude;

    @Schema(description = "纬度")
//    @NotNull(message = "{validation.common.lat}")
    private BigDecimal latitude;
}
